Skip to content

Conversation

@S1mpleMadz
Copy link

@S1mpleMadz S1mpleMadz commented Nov 28, 2025

https://issues.apache.org/jira/browse/SOLR-16247

Description

Null return / 0 return when searching through negative query in child filter.
!parent filters= is prone to pure negative query

This was a fix worked and developed in the hackathon at London on the 28/11/2025

Solution

Solution is to take out the query from the filter , parse it through makeQueryable() which checks if the query is negative or not, if the query is negative , we add " : " to the query and wrap it in a filter again to return the query.

Tests

Wrote a testPureNegativeQueryInChildFilters() test which child the "childFq" to a negative query and checked that we get the correct value back with the removed negative query

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants